var page = require('webpage').create();
//page.zoomFactor=1.5
page.viewportSize = {width: 1600, height: 1024};

page.open('https://jira.foxitsoftware.cn/secure/Dashboard.jspa?selectPageId=15532&os_username=xiuju_lan&os_password=Test,123', function() {

 window.setTimeout(function () {
     page.evaluate(function() {
	 var today = new Date();
     var text = window.document.getElementsByClassName("aui-page-header-main")[0].children[0].textContent;
     window.document.getElementsByClassName("aui-page-header-main")[0].children[0].innerText=text+" "+today
    });
      page.render('jira.png');
     page.render('jiraQ3report.pdf');
     phantom.exit();
}, 20000 );
});
